<?php
namespace common\upload;

use yii\web\UploadedFile;

class Upload extends  UploadedFile{


    public function upload($validate)
    {
        if ($this->validate()) {
            $this->imageFile->saveAs('uploads/' . $this->imageFile->baseName . '.' . $this->imageFile->extension);
            return true;
        } else {
            return false;
        }
    }


}


